From: Jasper St. Pierre Date: Mon, 22 Apr 2013 22:20:11 +0000 (-0400) Subject: workspace: Invalidate the current layout when windows are added or removed X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~1013^2^2~4301 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=8b3b91d78d9760454698a65c063b16565cd9a4c0;p=gnome-shell.git workspace: Invalidate the current layout when windows are added or removed If windows are removed or added, we shouldn't keep the old layout, as it's not valid anymore. If windows are removed, this is especially bad, as the rows contain references to the removed window objects, causing crashes. https://bugzilla.gnome.org/show_bug.cgi?id=698622 --- diff --git a/js/ui/workspace.js b/js/ui/workspace.js index 8121c69cb..ae6ad181a 100644 --- a/js/ui/workspace.js +++ b/js/ui/workspace.js @@ -1257,6 +1257,7 @@ const Workspace = new Lang.Class({ this._cursorX = x; this._cursorY = y; + this._currentLayout = null; this._repositionWindowsId = Mainloop.timeout_add(750, Lang.bind(this, this._delayedWindowRepositioning)); }, @@ -1304,6 +1305,7 @@ const Workspace = new Lang.Class({ clone.overlay.relayout(false); } + this._currentLayout = null; this._recalculateWindowPositions(WindowPositionFlags.ANIMATE); },